import 'package:distribution_mall_flutter/generated/json/base/json_convert_content.dart';
import 'package:distribution_mall_flutter/entity/delete_account/delete_account_send_code_entity.dart';

DeleteAccountSendCodeBody $DeleteAccountSendCodeBodyFromJson(
    Map<String, dynamic> json) {
  final DeleteAccountSendCodeBody deleteAccountSendCodeBody = DeleteAccountSendCodeBody();
  final String? checkCode = jsonConvert.convert<String>(json['checkCode']);
  if (checkCode != null) {
    deleteAccountSendCodeBody.checkCode = checkCode;
  }
  final int? codeLength = jsonConvert.convert<int>(json['codeLength']);
  if (codeLength != null) {
    deleteAccountSendCodeBody.codeLength = codeLength;
  }
  final String? codeType = jsonConvert.convert<String>(json['codeType']);
  if (codeType != null) {
    deleteAccountSendCodeBody.codeType = codeType;
  }
  final int? sendCoolDownSecond = jsonConvert.convert<int>(
      json['sendCoolDownSecond']);
  if (sendCoolDownSecond != null) {
    deleteAccountSendCodeBody.sendCoolDownSecond = sendCoolDownSecond;
  }
  return deleteAccountSendCodeBody;
}

Map<String, dynamic> $DeleteAccountSendCodeBodyToJson(
    DeleteAccountSendCodeBody entity) {
  final Map<String, dynamic> data = <String, dynamic>{};
  data['checkCode'] = entity.checkCode;
  data['codeLength'] = entity.codeLength;
  data['codeType'] = entity.codeType;
  data['sendCoolDownSecond'] = entity.sendCoolDownSecond;
  return data;
}

extension DeleteAccountSendCodeBodyExtension on DeleteAccountSendCodeBody {
  DeleteAccountSendCodeBody copyWith({
    String? checkCode,
    int? codeLength,
    String? codeType,
    int? sendCoolDownSecond,
  }) {
    return DeleteAccountSendCodeBody()
      ..checkCode = checkCode ?? this.checkCode
      ..codeLength = codeLength ?? this.codeLength
      ..codeType = codeType ?? this.codeType
      ..sendCoolDownSecond = sendCoolDownSecond ?? this.sendCoolDownSecond;
  }
}